<?php


namespace App\Http\Controllers;


use App\Http\Services\FileService;
use App\Http\Traits\ApiReturn;
use Illuminate\Http\Request;

use Illuminate\Support\Facades\Log;

class FileController extends BaseController
{
    use ApiReturn;
    protected $fileService;
    public function __construct(Request $request,FileService $fileService)
    {
        $this->fileService = $fileService;
        $this->request = $request;
        parent::__construct($request);
    }

    public function upload()
    {
         // 验证文件上传

        $result = $this->fileService->upload($this->request);
        return  $this->succ($result);
    }

    public function delete()
    {
        // 验证文件上传

        $result = $this->fileService->delete($this->request);
        return  $this->succ($result);
    }



}
